using System; 
using System.Text; 
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration; 
using System.Xml; 
using System.Xml.Serialization;
using SubSonic; 
using SubSonic.Utilities;
namespace Data
{
    /// <summary>
    /// Controller class for Orders
    /// </summary>
    public partial class categorydetailController
    {


		
	    /// <summary>
	    /// Inserts a record, can be used with the Object Data Source
	    /// </summary>
        [DataObjectMethod(DataObjectMethodType.Insert, true)]
	    public void Insert(
                                        String 
                            CateDetailID
                            , 
                            String 
                            Name
                            , 
                            String 
                            CateID
                            , 
                            String 
                            Description
                            , 
                            Int32 
                            VipLevel
                            , 
                            String 
                            Active
                            , 
                            String 
                            Image
                            , 
                            String 
                            Price
                            , 
                            Int32 
                            Status
                            , 
                            Double 
                            Quantity
                            , 
                            Double 
                            QuantitySold
                            , 
                            DateTime 
                            CreatedDate
                            , 
                            DateTime 
                            UpdatedDate
                            , 
                            String 
                            Hot
            )
	    {		
			categorydetail item = new categorydetail();
			
			item.CateDetailID = CateDetailID;
			item.Name = Name;
			item.CateID = CateID;
			item.Description = Description;
			item.VipLevel = VipLevel;
			item.Active = bool.Parse(Active);
			item.Image = Image;
			item.Price = Price;
			item.Status = Status;
			item.Quantity = Quantity;
			item.QuantitySold = QuantitySold;
			item.CreatedDate = CreatedDate;
			item.UpdatedDate = UpdatedDate;
			item.Hot = bool.Parse(Hot);
		    item.Save("");
	    }

	    /// <summary>
	    /// Updates a record, can be used with the Object Data Source
	    /// </summary>
        [DataObjectMethod(DataObjectMethodType.Update, true)]
	    public void Update( String  CateDetailID,  String  Name,  String  CateID,  String  Description,  Int32  VipLevel,  String  Active,  String  Image,  String  Price,  Int32  Status,  Double  Quantity,  Double  QuantitySold,  DateTime  CreatedDate,  DateTime  UpdatedDate,  String  Hot)
		{
			categorydetail item = new categorydetail();
			
			item.CateDetailID = CateDetailID;
			item.Name = Name;
			item.CateID = CateID;
			item.Description = Description;
			item.VipLevel = VipLevel;
			item.Active = bool.Parse(Active);
			item.Image = Image;
			item.Price = Price;
			item.Status = Status;
			item.Quantity = Quantity;
			item.QuantitySold = QuantitySold;
			item.CreatedDate = CreatedDate;
			item.UpdatedDate = UpdatedDate;
			item.Hot = bool.Parse(Hot);
		    item.MarkOld();
		    item.Save("");		
	    }
    }

}
